{% extends 'registration/base.html' %}
{% load myfilter %}
{% block content %}
    {% if user.is_authenticated %}
        <script>window.location.href = '/';</script>
    {% endif %}
    {% for i in form %}
        {{ i|add_class:"form-control" }}
    {% endfor %}
    {% if form.errors %}
        <blockquote style="text-align:left;">用户名或密码错误！</blockquote>
    {% endif %}

    <div>

        <div class="row">
            <div class="col-sm-6">
                <button type="submit" class="btn btn-success btn-block" value="login" name="login">登录</button>
            </div>
            <div class="col-sm-6">
                <button type="reset" class="btn btn-default btn-block">重置</button>
            </div>
        </div>

        <a class="reset_pass" href="#">忘记密码？</a>

        <div class="clearfix"></div>

        <div class="separator"></div>
    </div>
{% endblock %}
